Fixed 2 bugs in font selection - initialising array sizes and checking that
authorDamon Chaplin <damon@src.gnome.org>
Sat, 25 Jul 1998 12:09:38 +0000 (12:09 +0000)
committerDamon Chaplin <damon@src.gnome.org>
Sat, 25 Jul 1998 12:09:38 +0000 (12:09 +0000)
a bitmapped font can be scaled.

gtk/gtkfontsel.c

index 9e8b8d65bd40e6dad0845b0599878993708f5af3..da4e713b7c73c31d444fe7e236ada8c69bd5835b 100644 (file)
@@ -1340,7 +1340,8 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel)
       nbitmapped_sizes = style->npixel_sizes;
     }
 
-  if (!fontsel->scale_bitmapped_fonts && !(style->flags & SCALABLE_FONT))
+  if (!(fontsel->scale_bitmapped_fonts && style->flags & SCALABLE_BITMAP_FONT)
+      && !(style->flags & SCALABLE_FONT))
     nstandard_sizes = 0;
 
   gtk_clist_freeze (GTK_CLIST(fontsel->size_clist));
@@ -1508,7 +1509,8 @@ gtk_font_selection_select_best_size(GtkFontSelection *fontsel)
 
   /* If we aren't scaling bitmapped fonts and this is a bitmapped font, we
      need to use the closest size found. */
-  if (!fontsel->scale_bitmapped_fonts && !(style->flags & SCALABLE_FONT))
+  if (!(fontsel->scale_bitmapped_fonts && style->flags & SCALABLE_BITMAP_FONT)
+      && !(style->flags & SCALABLE_FONT))
     found = TRUE;
 
   if (found)
@@ -2341,7 +2343,9 @@ gtk_font_selection_get_fonts (void)
                = gtk_font_selection_insert_field (fontname, prop);
            }
          current_style->pixel_sizes_index = npixel_sizes;
+         current_style->npixel_sizes = 0;
          current_style->point_sizes_index = npoint_sizes;
+         current_style->npoint_sizes = 0;
          current_style->flags = 0;